#include "mainwindow.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    subwidget subw;
    w.show();

    QObject::connect(&subw,SIGNAL(mainwindow()),&w,SLOT(receivelogin()));//subwidget界面发送的信号关联到mainwindow界面的槽
    QObject::connect(&w,SIGNAL(subwidgetshow()),&subw,SLOT(receiveshow()));//mainwindow界面发送的信号关联到subwidget界面的槽

    return a.exec();
}
